package com.roomio.core.service.impl;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.User;

public abstract class BaseService {
	protected final Logger log = LoggerFactory.getLogger(getClass());

//	@Resource(name = "systemSettingDAO")
//	protected SystemSettingDAO systemSettingDAO;
//	
//	
//	public SystemSettingDAO getSystemSettingDAO() {
//		return systemSettingDAO;
//	}
//
//
//	protected User getCurrentUser() {
//		Authentication auth = SecurityContextHolder.getContext().getAuthentication();
//		User user = null;
//		if (auth != null && (auth.getPrincipal() instanceof UserContext)) {
//			UserContext userContext = (UserContext) auth.getPrincipal();
//			user = userContext.getUser();
//		}else {
//			log.debug("### Security context is null###");
//		}
//		return user;
//	}	

}